﻿<?php
require './Home/Controller/Controller.php ';
require './Home/Model/ShowModel.php ';
class ShowController extends Controller{
	function __Construct(){
		parent::__Construct();
	}
	function show(){
		$tid=$_GET['id'];
		$model=new ShowModel();
		$this->assign('videos',$model->getVideos($tid));
		$this->assign('type',$model->getVideoType($tid));
		$this->display(); 
	}
	
	function login(){
		$data=$_POST;
		//var_dump($data);
		$model = new IndexModel();
		$result = $model->getUserLogin($data);
		if($result)
		{
			echo '登录成功 <a href="index.php">如果没有跳转，请点这里跳转</a>';
   			header("refresh:3;url='index.php'");
		}
		else{
			echo "登录失败！<br/>";
  			echo "<a href='admin.php?c=index&m=index'>返回</a>";
		}
	}
}
?>